package com.itheima.health.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.itheima.health.pojo.Setmeal;
import com.itheima.health.vo.SetmealVO;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

public interface SetmealMapper extends BaseMapper<Setmeal> {
    @Insert("insert into t_setmeal_checkgroup values(#{sid},#{checkgroupId})")
    void addSetmealAndGroupInfo(@Param("sid") Integer sid, @Param("checkgroupId") Integer checkgroupId);

    @Select("select img,name,sex,remark,age  from t_setmeal where id = #{id}")
    SetmealVO findSetmealById(@Param("id") int id);
}

